package br.com.wryel.model;
import java.io.Serializable;

import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;


public interface GenericModel<Entity extends Serializable> {

	@Transactional(propagation = Propagation.REQUIRED)
	public void save(Entity entity) throws ModelException;
	
	@Transactional(propagation = Propagation.SUPPORTS)
	public Entity retrieve(Entity entity) throws ModelException;
	
	@Transactional(propagation = Propagation.REQUIRED)
	public void delete(Entity entity) throws ModelException;
}
